/* ============================================
   TIME IN MINI MART — GLOBAL MOBILE COMPONENTS
   Shared mobile-only CSS for:
   - Mobile global header (logo + hamburger)
   - Hamburger icon (home values, 36×36)
   - Left-drawer nav overlay
   - Bottom navigation bar (Home / Search / Profile / Wishlist / Cart)
   - SHOP accordion sub-menu
   ============================================ */

/* ---- Mobile global header (replacement for nav-bar on mobile) ---- */
.mobile-global-header {
  display: none;
}

@media (max-width: 1024px) {

  /* Hide desktop nav-bar on pages using the global mobile shell */
  body.gg-mobile-shell .nav-bar {
    display: none;
  }

  /* Show the mobile header */
  .mobile-global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 20px;
    background: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }

  .mobile-global-header .mobile-global-logo {
    display: flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
  }

  .mobile-global-header .mobile-global-logo-img {
    height: 54px;
    width: auto;
    display: block;
  }

}

/* ---- Hamburger (exact home values) ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-dark, #333333);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }
}

/* ---- Mobile nav overlay (drawer) ---- */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1012;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80vw;
  max-width: 360px;
  background: #FFFFFF;
  padding: 24px 24px 30px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-overlay.active .mobile-nav-panel {
  transform: translateX(0);
}

/* ---- Nav list (drawer links) ---- */
.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid #E8E9EC;
}

.mobile-nav-list a {
  display: block;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-dark, #1F2328);
  text-decoration: none;
}

.mobile-nav-list a:hover,
.mobile-nav-list a:active {
  color: var(--warm-brown, #C4793A);
}

/* ---- SHOP accordion sub-menu ---- */
.mobile-shop-wrap {
  position: relative;
}

.mobile-shop-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--text-dark, #1F2328);
  text-decoration: none;
}

.mobile-shop-toggle i {
  font-size: 12px;
  color: #8C8F94;
  transition: transform 0.2s ease;
}

.mobile-shop-wrap.open .mobile-shop-toggle i {
  transform: rotate(180deg);
}

.mobile-shop-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 10px 18px;
  display: none;
}

.mobile-shop-wrap.open .mobile-shop-sub {
  display: block;
}

.mobile-shop-sub a {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  color: #8C8F94;
  text-decoration: none;
  border-bottom: 1px solid #F2F5F7;
}

.mobile-shop-sub a:hover {
  color: var(--warm-brown, #C4793A);
}

/* ---- Bottom navigation bar ---- */
.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1005;
  display: none;
  height: 64px;
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav-list {
  flex: 1 1 0;
  width: 100%;
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-bottom-nav-list li {
  flex: 1 1 0;
  min-width: 0;
}

.mb-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  color: #8A8A8A;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.mb-nav-item i {
  font-size: 19px;
  line-height: 1;
}

.mb-nav-item.active,
.mb-nav-item:active {
  color: var(--warm-brown, #C4793A);
}

.mb-nav-item .icon-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 14px);
  width: 15px;
  height: 15px;
  background: var(--pink-accent, #E0878A);
  color: #FFFFFF;
  font-size: 8px;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- Mobile-only layout adjustments ---- */
@media (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex;
  }

  /* Bottom clearance for the fixed bottom nav */
  body {
    padding-bottom: 88px;
  }

  /* Lift the back-to-top button above the bottom nav */
  .back-to-top {
    bottom: 84px;
  }
}

/* ---- Print: hide the bottom nav ---- */
@media print {
  .mobile-bottom-nav {
    display: none !important;
  }
}
